package com.javaee.service.user.impl;

import com.javaee.entity.Board;
import com.javaee.mapper.admin.BoardMapper;
import com.javaee.service.user.UBoardService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class UBoardServiceImpl implements UBoardService {
    @Autowired
    private BoardMapper boardMapper;
    @Override
    public Board getNoticeById(int id) {
        Board board=boardMapper.getBoardById(id);
        board.setSeecount(board.getSeecount()+1);
        boardMapper.updateBoard(board);
        return board;
    }
}
